<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/jdbc https://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util-3.1.xsd">

	<jdbc:embedded-database id="dataSource" type="HSQL" />

	<jdbc:initialize-database data-source="dataSource" enabled="#{properties['data.source.init']}">
		<jdbc:script location="#{properties['schema.scripts']}" />
		<jdbc:script location="#{properties['insert.scripts']}" />
	</jdbc:initialize-database>

	<util:properties id="properties">
		<prop key="schema.scripts">classpath:org/springframework/jdbc/config/db-schema.sql</prop>
		<prop key="insert.scripts">classpath*:org/springframework/jdbc/config/*-data.sql</prop>
		<prop key="data.source.init">true</prop>
	</util:properties>

</beans>
